function [j] = MaximumAt(A, offset)

L = length(A);
j = offset;
a = 0;
for i = 1:1:L
  if (a < A(i))
    a = A(i);
    j = i + offset;
  end
end
